#include <iostream>
using namespace std;

int main()
{
    int n;
    cin >> n;
    if (n < 3)
    {
        cout << n;
        return 0;
    }
    int a[41];
    a[1] = 1;
    a[2] = 2;
    for (int i = 3; i <= n; i++)
        a[i] = a[i - 1] + a[i - 2];
    cout << a[n];
    return 0;
}